package ooday02;

public class Student extends Person {
    private String className;
    private String stuId;

    public Student(String name, int age, String address, String className, String stuId) {
        super(name, age, address);
        this.className = className;
        this.stuId = stuId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getStuId() {
        return stuId;
    }

    public void setStuId(String stuId) {
        this.stuId = stuId;
    }

    public void study() {
        System.out.println(this.getName() + "正在学习...");
    }

    @Override
    public void sayHi() {
        System.out.println("大家好，我叫" + this.getName() + "，今年" + this.getAge() + "岁了，家住"
                + this.getAddress() + "，所在班级为:" + this.getClassName() + "，学号为：" + this.getStuId());
    }
    public void playWith(Student s){
        System.out.println(this.getName()+"正和"+s.getName()+"愉快的玩耍");
    }
}
